dofile (getScriptPath() .. "\\..\\processor\\processor.lua")

if not processor.log then

dofile (getScriptPath() .. "\\..\\processor\\saver.lua")
dofile (getScriptPath() .. "\\..\\lib\\lib.lua")


function processor:InitLog(fn)
	self:InitSharedSaver("log", fn)
	--lib:remove(fn)
end


function processor:LogTime()
	local time = os.sysdate()
	return string.format("%02d:%02d:%02d.%04d", time.hour, time.min, time.sec, time.ms)
end


function processor:log(...)
	local arg = {...}
	local t = self:LogTime() .. " "
	
	for i, a in ipairs(arg) do
		if type(a) ~= "string" then
			a = lib:tostring(a)
		end
		
		self:save("log", t .. a)
		
		if i == 1 then
			t = ""
		end
	end
	
	if string.len(t) == 0 then
		self:save("log", "")
	end
end


end -- of file
